<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>用户登录</title>
 
<style type="text/css">
	* {
		margin: 0;
		padding: 0;
	}
	
	body {
		font: 12px 宋体;
		background: #4BB8EF url(/oas/Images/bg.gif) repeat-x;
	}
	
	img {
		border: 0;
	}
	
	.login-top {
		width: 100%;
		height: 186px;
		margin: 147px auto 0;
		background: url(/oas/Images/login_01.gif) no-repeat center 0;
	}
	
	.login-area {
		text-align: center;
		width: 100%;
		height: 140px;
		margin: 0 auto;
		background: url(/oas/Images/login_02.gif) no-repeat center 0;
	}
	
	.login-area form {
		width: 290px;
		margin: 0 auto;
	}
	
	.login-area label {
		clear: left;
		float: left;
		margin-top: 13px;
		width: 60px;
		font: 600 14px 宋体;
	}
	
	.login-area  input {
		width: 122px;
		height: 16px;
		margin-top: 11px;
		border: 1px #767F94 solid;
		font: 12px/ 16px 宋体;
	}
	
	input.login-sub {
		width: 204px;
		height: 34px;
		border: 0;
		background: url(/oas/Images/login_sub.gif) no-repeat 90px 1px; *
		margin-top: 5px;
	}
	
	.login-copyright {
		width: 100%;
		height: 30px;
		margin: 18px auto 0;
		background: url(/oas/Images/copyright.gif) no-repeat center 0;
	}
	
	#msg{
		color:red;
	}
</style>

</head>
 
<body>
<script type="text/javascript">
	document.write();
</script>
	<div class="login-top"></div>
	<div class="login-area">
		<form action="login" onsubmit="return validateRequired()" method="post">
			<label for="username">
				工&nbsp;&nbsp;号：
			</label>
			<input type="text" name="username" id="username"/>
			<label for="password">
				密&nbsp;&nbsp;码：
			</label>
			<input type="password" name="password" id="password"/>

			<input type="submit" class="login-sub" value="" />
			<br/>
			<span id="msg"><s:property value="message"/></span><br/>
		</form>
		
	</div>
	<div class="login-copyright"></div>
	
	<script>
		function validateRequired()
		{
			var username=document.getElementById("username");
			var password=document.getElementById("password");
			if (username.value==null || username.value=="")
			{
				alert("工号不能为空！");
				return false;
			}
			else if (password.value==null || password.value=="")
			{
				alert("密码不能为空！");
				return false;
			}
			else
			{
				return true;
			}
		}
</script>
</body>
</html>